// TestConnectionLibraryServer.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"

#include "Libs/Native/Common/FastLogger.h"
#include "Libs/Native/ConnectionLibrary/ConnectionLibrary.h"

#include "ClientHandler.h"
#include <iostream>

using namespace AlgoTrading::ConnectionLibrary;

int _tmain(int argc, _TCHAR* argv[])
{
	AlgoTrading::Logging::fastLogger.Start();

	ClientConnectionAcceptorPtr acceptor(new ClientConnectionAcceptorImpl());
	std::auto_ptr<ServerConnectionLibrary> server =  CreateServerConnectionLibraryInstance(acceptor, std::string("localhost"), std::string("9999"));
	//std::auto_ptr<ServerConnectionLibrary> server =  CreateServerConnectionLibraryInstance(acceptor, std::string("localhost"), std::string("9999"));
	server->Start();

	int i = 0;
	std::cin >> i;

	server->Stop();

	return 0;
}